package com.borened.common.boot.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 线程池配置属性
 *
 * @author: cch
 * @since: 2022/3/10
 */
@Component
@ConfigurationProperties(prefix = "thread.pool")
@Data
public class ThreadPoolProperties {
    /**
     * 核心线程数
     */
    private int corePoolSize = 10;
    /**
     * 最大线程数
     */
    private int maxPoolSize = 50;

    /**
     * 等待队列容量
     */
    private int queueCapacity = 9999;
    /**
     * 线程池中的线程命名前缀
     */
    private String threadNamePrefix = "yfm-thread";
}
